package com.qf.api.sys.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.qf.core.annotation.ExcelColumn;
import com.qf.core.annotation.ExcelSheet;
import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Date;

/**
 * @Author: sin
 * @Date: 2025/5/21 21:28
 * @Description:
 **/
@TableName(value ="分页用户响应对象")
@Data
@AllArgsConstructor
@ExcelSheet(name = "用户信息")
public class UserPageVO {

    @ExcelColumn(name = "用户Id",order = 0)
    private Long id;

    @ExcelColumn(name = "用户名",order = 1)
    private String username;

    @ExcelColumn(name = "昵称",order = 2)
    private String nickname;

    @ExcelColumn(name = "手机号码",order = 4)
    private String mobile;

    private Integer gender;

    @ExcelColumn(name = "头像",order = 5)
    private String avatar;

    @ExcelColumn(name = "邮箱",order = 6)
    private String email;

    private Integer status;

    private Long roleId;

    @ExcelColumn(name = "创建时间",order = 7)
    private Date createTime;

    @ExcelColumn(name = "备注信息",order = 8)
    private String remark;

    @ExcelColumn(name = "性别", order = 3)
    @TableField(exist = false)
    private String genderStr; // 显示“男”或“女”

    public UserPageVO(Long id, String username, String nickname, String mobile, Integer gender, String avatar,
                      String email,
                      Integer status, Long roleId, Date createTime, String remark) {
        this.id = id;
        this.username = username;
        this.nickname = nickname;
        this.mobile = mobile;
        this.gender = gender;
        this.avatar = avatar;
        this.email = email;
        this.status = status;
        this.roleId = roleId;
        this.createTime = createTime;
        this.remark = remark;
    }
}
